package com.bookstore.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("books")
@ApiModel(description = "图书信息")
public class Book {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("图书ID")
    private Integer bookId;

    @ApiModelProperty("ISBN")
    private String isbn;

    @ApiModelProperty("书名")
    private String title;

    @ApiModelProperty("作者ID")
    private Integer authorId;

    @ApiModelProperty("出版社ID")
    private Integer publisherId;

    @ApiModelProperty("分类ID")
    private Integer categoryId;

    @ApiModelProperty("价格")
    private BigDecimal price;

    @ApiModelProperty("库存")
    private Integer stock;

    @ApiModelProperty("出版日期")
    private Date publicationDate;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("封面图片")
    private String coverImage;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;
} 